Guild Wars Forums - GW Guru
 
 

Go Back   Guild Wars Forums - GW Guru > The Inner Circle > Sardelac Sanitarium

Notices

Reply
 
Thread Tools Display Modes
Old Jan 30, 2011, 11:29 PM // 23:29   #1
Ascalonian Squire
 
Join Date: Nov 2006
Guild: Odin's Hammer
Profession: Mo/
Advertisement

Disable Ads
Default Mulling over an improved AI

Recently the Doppleganger came up as a z-mission, and the outcome of me running a good dozen characters through him had me mulling over the AI. Not that we *need* a tougher doppleganger or foes, but in the generic sense 'this could be better', and I have an instinctive reaction of 'lets improve this' whenever that happens. At the outset, I'll grant that what I'm proposing may well place unrealistic load considerations on the a-net servers and possibly even the programmers... (One would hope... fingers crossed...)

What got me most was the ranger spirits. Give the doppleganger any 5 spirit skills, and kill him with the remaining 3 skills while he plants the spirits. Which spirits? Didn't matter. Had no relevance that the spirits had 0 effect for the bar and gear the Doppleganger was using, he'd still plant it, all the while I was planting arrow after arrow into his torso. This struck me as odd. Thinking over some other things in the game with the AI, I think I've got the idea for an improved idea. (To what purpose? None, but thought experiments can be entertaining).

What actions can an AI take?
First item: Who can the AI interact with?
Answer: Everyone on his radar. Same as what any player can see.

Second item: How can the AI interact with them?
Answer: It can use skills on targets within range for skills. It can also approach or move away from everything on the radar.

Take these two answers and break it out into a list of actions, then weight them according to how useful the action is. Eg: Use heal skill on wounded ally: High. Use heal skill on healthy ally, low. Use Prot spirit on at-risk ally with low maximum hp: high, etc.

What about those allies (or enemies) we want to use skills on that are outside the activation range? Based on the answers above, we don't try to use skills on targets that are out of range. Correct! We only consider them on targets in range, but each skill on the bar is allowed to weight every action. Observe:

Ally outside of spell range is wounded. We have the skill heal-other on our bar. Heal-Other will weight the 'move towards this ally' heavily. This does 3 neat things for the AI:
1) It obliviates the 'activation-lock' that the AI can sometimes get into. Usually good (or merely annoying) when foes do it, it can be quite a bother with heros and henchmen who get bodyblocked on minions while chasing a caster.
2) Implemented properly, the healers for a group will try to keep the NPC in range for skill activation (eg: The back line will not designate itself a tank. In fact, weighting it to avoid foes, it can keep itself as a 'back line' with most/all the front-line in range). Similar for any character with skills that affect all targets in earshot.
3) If one ally becomes over-extended... oh well. The monk can be kept with the main party. I'll revisit this scenario at the end...

Skills weight themselves based on 'predicted effectiveness'. EG: 'How much healing will I do', 'how much will this hurt-hinder the enemy', and the classic 'Do I really *want* to use Nature's Renewal?' This means that each skill will need a way of scoring its effectiveness that allows for little surprises (strong vs fire? eep! May want to try my 2 water skills..). This will need to include things like Divine Favor healing and secondary effects (Dismiss Condition -- heals if enchanted), as well as primary requirements (Conjure Flame - requires fire weapon). This opens the AI to using skills much the same way a player will in a pinch -- Casting aura of restoration repeatedly to heal against degen, despite lacking targets (or just energy) for bigger skills. Using dismiss condition as a heal, not just condition removal, etc, while ignoring skills that have no benefit (Conjure Flame while Winter is up? pass), and siezing skills of critical importance (3 dead allies and frozen soil is up? Ho there, Gaze of Fury REALLY wants to be used on that spirit)

If an action weights highest, use that action. If movement in a particular direction weights higher than action, move in that direction. While there are a couple ways to weight the movement, it should consider maintaining proper spacing between allies (Balling up for AoE is a Bad Thing, remember?) even when on the move. For example, around corners (Yo, Kournans! Spread out, would you? You're making this easy for us players!) One should also be prepared to allow movement at different speeds ('run away' = critical hits, best to 'back away').

When do we check our action matrix? Anytime something meaningful happens.
What events are meaningful?
Events that add or remove rows from the table (which add or remove allies/foes).
Events that change which targets a skill can be used on (range threshold changes).
Gaining/loosing effects that change the effectiveness of skills.
About to lose effects (prot spirit on a 55hp monk, for example).
Receiving healing or damage, as well as health changes due to regen/degen.
Someone dying or being resurrected. Spirits or minions being summoned/animated, etc.
Gaining or losing energy.

The AI should pay attention to the same things that players need to be alert for. New minion summoned? Should it be the new target? Did they res a dead player to 20% hp? Will one arrow kill it again? I am under the effects of Splinter, time to find a target for barrage. Warmongers weapon? Best I target a caster.

Lastly, allow the AI to interrupt its own actions. Last foe dead? Cancel that meteor shower to save the exhaustion.

The goal here is to make the AI reactive to any significant changes that occur during a battle.

-----------------------
This gives us the basic framework for a higher quality AI. Now to make it more frightening. Muwahahahaha!

It's all about synergy.

Allow the various skills to weight the value of other skills. Conjure frost on your bar? Winter on your bar too? Got a fiery dragon sword onhand? Have conjure frost adjust the weight for using winter. Weak versus lightening? Weight using winter. Got a skill that's more effective around spirits? Same. This allows a build where skills that work with synergy in specific orders (patient spirit + dwayna's kiss heals more than the reverse) get used in ways that the synergy is brought out, without requiring specific coding unique to the build (I won't mention certain monk NPCs. Cough. Cough.). Yes, each skill will require individual coding, but actual builds will not.

-----------------------

Now to take it to the next level. Literally. Very simple addition to the above:
Allow skills from other party members to weight my own skill-use. Has a party member got smite condition? Have I got a skill that causes myself to bleed? Might be worth using that condition causing skill. Our prot monk has all enchantments? May want to get my Symbiosis up.

Don't stop there. As we become aware of enemy skills, fit them into the equation. They quickly remove conditions but haven't removed our hexes? Weight for more hex use. Their warrior is using Melandru's Resiliance? Might hold off on hexes and conditions both.

-----------------------

Toning it down...
The AI is notorious for having a lightning fast reaction time. Introduce a sizable delay in reacting to changes. Wait as much as a full second before reacting to events. We want the AI to be smart, and we've achieved that to an extent above, but this lets us now cut back on some of the AIs natural strenghts that some players might consider unfair. Higher level foes or elite areas may play with an improved reaction time, this is more to keep the regular-play areas from becoming impossibly difficult.

-----------------------

Adjusting for the meta...
If a player keeps getting beat up by a single hex as he fights through an area, he'd add a hex removal skill to his bar.

Let monsters to the same: Give them some optional spots on their bars. If the meta is to beat up on the NPCs using hex based builds, start swapping out optional skills for hex removal or caster hate.
If conditions are the common winning factor, bring skills to counter them. If melee is prevelant, consider blocking skills, blindness, and other noxious skills. Keep adjusting to the players, but also branching out in ways that force the players to react to YOU.

-----------------------

The final product in (theoretical) action:
Picture two groups of foes. One human, one AI driven.

The AI driven group starts with the monks towards the middle, warriors scattered around the casters. As the human group approaches, the AI monks slowly drift to the back, and the warriors drift to the front.

The human archer pre-buffs with Conjure Flame, and the AI ranger responds by backing up a short distance and starting to plant winter. The human mage steps in and starts casting meteor shower. The AI warrior spots this and charges up to interrupt the cast. Body-blocked. No problem, this is what he brings death's charge for, and moments later the meteor shower is interrupted and the elementalist is under heavy assault. The AI mesmer notes as a human Necromancer plays out weapon of warding on the assaulted elementalist, and after the mesmer finishes his current e-surge, plants a diversion on now-obvious necro-healer. Even as this plays out, the AI monks are moving forward some to support the over-extended AI warrior, who is himself under heavy assult by the human team. The AI warrior is backing towards the monks for healing with Bonteti's Defense active. The AI Elementalist spots the clump of targets balling on the retreating, wounded warrior and begins to exploit its AoE skills to the maximum. The battle ensues...
//Yamagawa
Yamagawa is offline   Reply With Quote
Reply

Share This Forum!  
 
 
           

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:07 AM // 05:07.


Powered by: vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.
jQuery(document).ready(checkAds()); function checkAds(){if (document.getElementById('adsense')!=undefined){document.write("_gaq.push(['_trackEvent', 'Adblock', 'Unblocked', 'false',,true]);");}else{document.write("